3.451 \(\int \frac {\tan ^4(c+d x)}{a+b \sin ^2(c+d x)} \, dx\)

Optimal. Leaf size=74 \[ \frac {a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{d (a+b)^{5/2}}+\frac {\tan ^3(c+d x)}{3 d (a+b)}-\frac {a \tan (c+d x)}{d (a+b)^2} \]

[Out]

a^(3/2)*arctan((a+b)^(1/2)*tan(d*x+c)/a^(1/2))/(a+b)^(5/2)/d-a*tan(d*x+c)/(a+b)^2/d+1/3*tan(d*x+c)^3/(a+b)/d

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3195, 302, 205} \[ \frac {a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{d (a+b)^{5/2}}+\frac {\tan ^3(c+d x)}{3 d (a+b)}-\frac {a \tan (c+d x)}{d (a+b)^2} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^4/(a + b*Sin[c + d*x]^2),x]

[Out]

(a^(3/2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/((a + b)^(5/2)*d) - (a*Tan[c + d*x])/((a + b)^2*d) + Tan[
c + d*x]^3/(3*(a + b)*d)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 3195

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> With[{ff
 = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[((d*ff*x)^m*(a + (a + b)*ff^2*x^2)^p)/(1 + ff^2*x^2)^(p
 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m}, x] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\tan ^4(c+d x)}{a+b \sin ^2(c+d x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^4}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (-\frac {a}{(a+b)^2}+\frac {x^2}{a+b}+\frac {a^2}{(a+b)^2 \left (a+(a+b) x^2\right )}\right ) \, dx,x,\tan (c+d x)\right )}{d}\\ &=-\frac {a \tan (c+d x)}{(a+b)^2 d}+\frac {\tan ^3(c+d x)}{3 (a+b) d}+\frac {a^2 \operatorname {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{(a+b)^2 d}\\ &=\frac {a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{(a+b)^{5/2} d}-\frac {a \tan (c+d x)}{(a+b)^2 d}+\frac {\tan ^3(c+d x)}{3 (a+b) d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.30, size = 75, normalized size = 1.01 \[ \frac {3 a^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )+\sqrt {a+b} \tan (c+d x) \left ((a+b) \sec ^2(c+d x)-4 a-b\right )}{3 d (a+b)^{5/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^4/(a + b*Sin[c + d*x]^2),x]

[Out]

(3*a^(3/2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]] + Sqrt[a + b]*(-4*a - b + (a + b)*Sec[c + d*x]^2)*Tan[c
+ d*x])/(3*(a + b)^(5/2)*d)

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 366, normalized size = 4.95 \[ \left [\frac {3 \, a \sqrt {-\frac {a}{a + b}} \cos \left (d x + c\right )^{3} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {a}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) - 4 \, {\left ({\left (4 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d \cos \left (d x + c\right )^{3}}, -\frac {3 \, a \sqrt {\frac {a}{a + b}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {a}{a + b}}}{2 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right )^{3} + 2 \, {\left ({\left (4 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d \cos \left (d x + c\right )^{3}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+b*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/12*(3*a*sqrt(-a/(a + b))*cos(d*x + c)^3*log(((8*a^2 + 8*a*b + b^2)*cos(d*x + c)^4 - 2*(4*a^2 + 5*a*b + b^2)
*cos(d*x + c)^2 - 4*((2*a^2 + 3*a*b + b^2)*cos(d*x + c)^3 - (a^2 + 2*a*b + b^2)*cos(d*x + c))*sqrt(-a/(a + b))
*sin(d*x + c) + a^2 + 2*a*b + b^2)/(b^2*cos(d*x + c)^4 - 2*(a*b + b^2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)) -
4*((4*a + b)*cos(d*x + c)^2 - a - b)*sin(d*x + c))/((a^2 + 2*a*b + b^2)*d*cos(d*x + c)^3), -1/6*(3*a*sqrt(a/(a
 + b))*arctan(1/2*((2*a + b)*cos(d*x + c)^2 - a - b)*sqrt(a/(a + b))/(a*cos(d*x + c)*sin(d*x + c)))*cos(d*x +
c)^3 + 2*((4*a + b)*cos(d*x + c)^2 - a - b)*sin(d*x + c))/((a^2 + 2*a*b + b^2)*d*cos(d*x + c)^3)]

________________________________________________________________________________________

giac [B]  time = 1.35, size = 164, normalized size = 2.22 \[ \frac {\frac {3 \, {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )} a^{2}}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {a^{2} + a b}} + \frac {a^{2} \tan \left (d x + c\right )^{3} + 2 \, a b \tan \left (d x + c\right )^{3} + b^{2} \tan \left (d x + c\right )^{3} - 3 \, a^{2} \tan \left (d x + c\right ) - 3 \, a b \tan \left (d x + c\right )}{a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+b*sin(d*x+c)^2),x, algorithm="giac")

[Out]

1/3*(3*(pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a^2 + a*b)
))*a^2/((a^2 + 2*a*b + b^2)*sqrt(a^2 + a*b)) + (a^2*tan(d*x + c)^3 + 2*a*b*tan(d*x + c)^3 + b^2*tan(d*x + c)^3
 - 3*a^2*tan(d*x + c) - 3*a*b*tan(d*x + c))/(a^3 + 3*a^2*b + 3*a*b^2 + b^3))/d

________________________________________________________________________________________

maple [A]  time = 0.49, size = 94, normalized size = 1.27 \[ \frac {a \left (\tan ^{3}\left (d x +c \right )\right )}{3 \left (a +b \right )^{2} d}+\frac {\left (\tan ^{3}\left (d x +c \right )\right ) b}{3 d \left (a +b \right )^{2}}-\frac {a \tan \left (d x +c \right )}{\left (a +b \right )^{2} d}+\frac {a^{2} \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{d \left (a +b \right )^{2} \sqrt {a \left (a +b \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^4/(a+b*sin(d*x+c)^2),x)

[Out]

1/3*a*tan(d*x+c)^3/(a+b)^2/d+1/3/d/(a+b)^2*tan(d*x+c)^3*b-a*tan(d*x+c)/(a+b)^2/d+1/d*a^2/(a+b)^2/(a*(a+b))^(1/
2)*arctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2))

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 85, normalized size = 1.15 \[ \frac {\frac {3 \, a^{2} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {{\left (a + b\right )} \tan \left (d x + c\right )^{3} - 3 \, a \tan \left (d x + c\right )}{a^{2} + 2 \, a b + b^{2}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+b*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

1/3*(3*a^2*arctan((a + b)*tan(d*x + c)/sqrt((a + b)*a))/(sqrt((a + b)*a)*(a^2 + 2*a*b + b^2)) + ((a + b)*tan(d
*x + c)^3 - 3*a*tan(d*x + c))/(a^2 + 2*a*b + b^2))/d

________________________________________________________________________________________

mupad [B]  time = 15.18, size = 83, normalized size = 1.12 \[ \frac {{\mathrm {tan}\left (c+d\,x\right )}^3}{3\,d\,\left (a+b\right )}-\frac {a\,\mathrm {tan}\left (c+d\,x\right )}{d\,{\left (a+b\right )}^2}+\frac {a^{3/2}\,\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (2\,a+2\,b\right )\,\left (a^2+2\,a\,b+b^2\right )}{2\,\sqrt {a}\,{\left (a+b\right )}^{5/2}}\right )}{d\,{\left (a+b\right )}^{5/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^4/(a + b*sin(c + d*x)^2),x)

[Out]

tan(c + d*x)^3/(3*d*(a + b)) - (a*tan(c + d*x))/(d*(a + b)^2) + (a^(3/2)*atan((tan(c + d*x)*(2*a + 2*b)*(2*a*b
 + a^2 + b^2))/(2*a^(1/2)*(a + b)^(5/2))))/(d*(a + b)^(5/2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan ^{4}{\left (c + d x \right )}}{a + b \sin ^{2}{\left (c + d x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**4/(a+b*sin(d*x+c)**2),x)

[Out]

Integral(tan(c + d*x)**4/(a + b*sin(c + d*x)**2), x)

________________________________________________________________________________________